/* Tree Table */
.tree-container {
  margin-bottom: var(--spacing-xl);
}

.tree-container .card {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tree-container .card-header {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tree-container .card-body {
  padding: 0;
}

.tree-entry-row,
.change-entry-row {
  transition: background-color var(--transition-fast);
}

.tree-entry-row:hover,
.change-entry-row:hover {
  background-color: var(--border-light);
}

.tree-path {
  font-size: 0.9rem;
}

.tree-path .octicon {
  color: inherit;
  margin-right: var(--spacing-xs);
}

/* Make icons in diff rows match their text color */
.diff-changed .tree-path .octicon {
  color: inherit;
}

.diff-added .tree-path .octicon {
  color: inherit;
}

.diff-removed .tree-path .octicon {
  color: inherit;
}

.diff-conflict .tree-path .octicon {
  color: inherit;
}

.prefix-expand-icon {
  margin-left: 10px;
  cursor: pointer;
  color: var(--bs-nav-link-color);
}

.tree-path-action {
  cursor: pointer;
  color: var(--bs-nav-link-color);
}

/* Gear icon visibility and alignment */
.change-entry-row-actions .dropdown-toggle,
.row-hover .btn-outline-danger {
  visibility: hidden;
  float: right;
}

.change-entry-row:hover .change-entry-row-actions .dropdown-toggle,
tr:hover .row-hover .btn-outline-danger {
  visibility: visible;
}

/* Consistent width for diff indicator columns */
.diff-indicator,
.entry-type-indicator {
  width: 40px !important; /* Just enough for icon + padding */
  min-width: 40px;
  max-width: 40px;
  text-align: center;
  vertical-align: middle;
  padding: 8px 12px 8px 16px !important; /* More left padding for spacing from border */
}

/* Override action-bar button margins for button groups */
.action-bar .btn-group .btn {
  margin-right: 0 !important;
}

/* Changes dropdown styling */
.changes-dropdown-menu {
  min-width: 200px;
}

.changes-action-btn {
  margin: 0 !important;
}

/* Fix for object browser gear icon dropdown */
.tree-container .dropdown-menu,
.change-entry-row .dropdown-menu {
  position: fixed !important; /* Use fixed positioning to avoid container constraints */
  max-height: 80vh; /* Limit height to 80% of viewport height */
  overflow-y: auto; /* Add scrolling if needed */
}

/* Dark mode specific styles for tree dropdown menus */
[data-bs-theme="dark"] .tree-container .dropdown-menu,
[data-bs-theme="dark"] .change-entry-row .dropdown-menu {
  background-color: #1f2937;
  border: 1px solid #374151;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .tree-container .dropdown-item,
[data-bs-theme="dark"] .change-entry-row .dropdown-item {
  color: #f9fafb;
}

[data-bs-theme="dark"] .tree-container .dropdown-item:hover,
[data-bs-theme="dark"] .change-entry-row .dropdown-item:hover {
  background-color: #374151;
  color: #f9fafb;
}

[data-bs-theme="dark"] .tree-container .dropdown-item:focus,
[data-bs-theme="dark"] .change-entry-row .dropdown-item:focus {
  background-color: #374151;
  color: #f9fafb;
}

[data-bs-theme="dark"] .tree-container .dropdown-item:active,
[data-bs-theme="dark"] .change-entry-row .dropdown-item:active {
  background-color: #4b5563;
  color: #f9fafb;
}

[data-bs-theme="dark"] .tree-container .dropdown-divider,
[data-bs-theme="dark"] .change-entry-row .dropdown-divider {
  border-color: #374151;
} 